function fetchNewBids(newBidsNumber,bids){
	var even = true;
	for(var i=0;i<newBidsNumber;i++){
		var tableRow = document.createElement('tr');
		if(even)
			tableRow.setAttribute('class', 'alt');
		even = !even;
		var bid =  bids[i];
		var ifOver = (bid.ifOver) ? ((bid.ifWon) ? "won": "lost") : "still";
		tableRow.innerHTML += bid.itemName + "&nbsp;&nbsp;" + bid.money + "$" +
		"&nbsp;&nbsp;" + ifOver;
		var container = document.getElementById('bidstsablebody');
		container.insertBefore(tableRow, container.firstChild);
	}
}


//placing a new bid

function placeBid(){
	var params = new Object();
	params.money = document.getElementById("money").value;
	params.itemID = document.getElementById("itemid").value;
	if(params.money < 0 || params.itemID)
		showError('invalid params');
	else
	newBid(params);
}




